<template>
  <div class="charts" ref="charts"></div>
</template>

<script>
import echarts from "echarts";

export default {
  props: {},
  name: "",
  data() {
    return {};
  },
  computed: {},
  created() {},
  mounted() {
    //   初始化echarts实例
    let myChart = echarts.init(this.$ref.charts);
    myChart.setOption({
      xAxis: {
        // 隐藏x轴
        show: false,
        type: "category",
      },
      yAxis: {
        // 隐藏y轴
        show: false,
      },
      series: [
        {
          type: "bar",
          data: [10, 7, 33, 12, 48, 9, 29, 10, 44, 33, 22, 8],
          color: "cyan",
        },
      ],
      tooltips: {},
      grid: {
        left: 0,
        top: 0,
        bottom: 0,
        right: 0,
      },
    });
  },
  watch: {},
  methods: {},
  components: {},
};
</script>

<style scoped lang="scss">
.charts {
  width: 100%;
  height: 100%;
}
</style>
